Data transmission method, data transmission apparatus, processor, and mobile terminal

ABSTRACT

Embodiments of the present invention provide a data transmission method, a data transmission apparatus, a processor, and a mobile terminal. The data transmission method includes: determining, by a mobile terminal, whether to use multiple data channels to transmit to-be-transmitted data; if determining to use the multiple data channels to transmit the to-be-transmitted data, selecting, by the mobile terminal, at least two activated data channels for the to-be-transmitted data according to current traffic information and service quality information that are of the multiple data channels; and using, by the mobile terminal, the selected at least two data channels to transmit the to-be-transmitted data.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/393,604, filed on Apr. 24, 2019, which is a continuation of U.S.patent application Ser. No. 15/557,163, filed on Sep. 11, 2017, now U.S.Pat. No. 10,314,096, which is a National Stage of InternationalApplication No. PCT/CN215/074102, filed Mar. 12, 2015. All of theaforementioned applications are hereby incorporated by reference intheir entireties.

TECHNICAL FIELD

The present invention relates to the field of communicationstechnologies, and in particular, to a data transmission method, a datatransmission apparatus, a processor, and a mobile terminal.

BACKGROUND

With development of communications technologies, a mobile terminal isincreasingly widely applied to all aspects of human life. People usemobile terminals to access the Internet anytime and anywhere, so as tohave various network experience, such as watching a video, or uploadingor downloading a file.

To help a mobile terminal user use the Internet and to improve userexperience of using the mobile terminal, more mobile terminals supportmultiple cards, and more than a few mobile terminals can supportconcurrency of multi-card data services in terms of specification.However, a mobile terminal that currently supports the concurrency ofmulti-card data services has multiple data channels, but a data serviceof only one card can be activated by default, that is, only one datachannel can be in an activated state. A multi-card mobile terminal usingan Android™ operating system is used as an example. Generally, in themulti-card mobile terminal using the Android operating system, a WiFidata channel has a higher priority than a card data channel, that is,after the WiFi data channel is activated, the card data channel isdeactivated. Therefore, at a same time, only one data channel of themulti-card mobile terminal using the Android™ operating system is in anactivated state to perform data interaction. Data transmission for alldata services is performed by using this activated data channel.

It may be learned that in an existing multi-card mobile terminal, datatransmission efficiency is low and an available data channel is idle,thereby causing a waste of resources.

SUMMARY

In view of the foregoing problems, the prevent invention is proposed toprovide a data transmission method, a data transmission apparatus, aprocessor, and a mobile terminal that overcome the foregoing problems orat least some problems.

According to an aspect of the present invention, a data transmissionmethod is provided, including determining, by a mobile terminal, whetherto use multiple data channels to transmit to-be-transmitted data and ifdetermining to use the multiple data channels to transmit theto-be-transmitted data, selecting, by the mobile terminal, at least twoactivated data channels for the to-be-transmitted data according tocurrent traffic information and service quality information that are ofthe multiple data channels. Additionally, the method includes using, bythe mobile terminal, the selected at least two data channels to transmitthe to-be-transmitted data.

According to another aspect of the present invention, a datatransmission apparatus is provided, where the data transmissionapparatus is disposed in a mobile terminal, and the apparatus includes adetermining module, configured to determine whether to use multiple datachannels to transmit to-be-transmitted data. The apparatus also includesa selection module, configured to if a determining result of thedetermining module is determining to use the multiple data channels totransmit the to-be-transmitted data, select at least two activated datachannels for the to-be-transmitted data according to current trafficinformation and service quality information that are of the multipledata channels. Additionally, the apparatus includes a transmissionmodule, configured to use the selected at least two data channels totransmit the to-be-transmitted data. According to still another aspectof the present invention, a processor is provided, where the processoris disposed in a mobile terminal, and the processor is configured toexecute the following operations determining whether to use multipledata channels to transmit to-be-transmitted data, if determining to usethe multiple data channels to transmit the to-be-transmitted data,selecting at least two activated data channels for the to-be-transmitteddata according to current traffic information and service qualityinformation that are of the multiple data channels, and using theselected at least two data channels to transmit the to-be-transmitteddata.

According to yet another aspect of the present invention, a mobileterminal is provided, including a memory, a transceiver, the processordescribed above, and a bus, where the memory, the transceiver, and theprocessor perform communication by using the bus, where the memory isconfigured to store an instruction; the processor is configured toexecute, according to the instruction stored in the memory, an operationexecuted by the foregoing processor; and the transceiver is configuredto receive or send the to-be-transmitted data according to the operationexecuted by the processor.

According to another aspect of the present invention, a computer programis provided, where the computer program includes computer-readable code,and when the computer-readable code runs on a mobile terminal, themobile terminal performs the foregoing data transmission method.

According to yet another aspect of the present invention, acomputer-readable medium is provided, where the computer-readable mediumstores the foregoing computer program.

Compared with the prior art, embodiments of the present invention havethe following advantages.

In a data transmission solution provided in the embodiments of thepresent invention, when needing to transmit data, a mobile terminal maydetermine whether it is necessary to enable multi-data channeltransmission; when determining that it is necessary to enable themulti-data channel transmission, the mobile terminal may select at leasttwo activated data channels for to-be-transmitted data according tocurrent traffic information and service quality information that are ofthe multiple data channels, so as to perform data transmission.According to the data transmission solution provided in the embodimentsof the present invention, compared with using a single data channel totransmit data, using multiple data channels to transmit data at the sametime greatly enhances data transmission efficiency; in addition, use ofmultiple data channels at the same time effectively avoids idleness anda waste of data channel resources.

BRIEF DESCRIPTION OF THE DRAWINGS

It becomes clear for persons skilled in the art to learn various otheradvantages and benefits by reading detailed description of the followingimplementation manners. Accompanying drawings are merely used forshowing the implementation manners, but not considered as a limitationon the present invention. In all accompanying drawings, a same referencesymbol is used to indicate a same part. In the accompanying drawings:

FIG. 1 is a flowchart of a data transmission method according toEmbodiment 1 of the present invention;

FIG. 2A and FIG. 2B are a flowchart of a data transmission methodaccording to Embodiment 2 of the present invention;

FIG. 3 is a flowchart of a data transmission method according toEmbodiment 3 of the present invention;

FIG. 4A and FIG. 4B are a flowchart of a data transmission methodaccording to Embodiment 4 of the present invention;

FIG. 5A and FIG. 5B are a flowchart of data channel allocation accordingto an embodiment shown in FIG. 4A and FIG. 4B;

FIG. 6A and FIG. 6B are a flowchart of channel selection according to anembodiment shown in FIG. 4A and FIG. 4B;

FIG. 7 is a structural block diagram of a data transmission apparatusaccording to Embodiment 5 of the present invention;

FIG. 8 is a structural block diagram of a data transmission apparatusaccording to Embodiment 6 of the present invention;

FIG. 9 is a schematic structural diagram of a mobile terminal accordingto Embodiment 8 of the present invention;

FIG. 10 is a schematic diagram of a mobile terminal configured toperform a method according to the present invention; and

FIG. 11 is a schematic diagram of a storage unit configured to keep orcarry program code that implements a method according to the presentinvention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

To make the objectives, features and advantages of embodiments of thepresent invention more comprehensible, the embodiments of the presentinvention are further illustrated in detail in the following withreference to the accompanying drawings and specific embodiments.

Embodiment 1

Referring to FIG. 1 , FIG. 1 shows a flowchart of a data transmissionmethod according to Embodiment 1 of the present invention.

The data transmission method in this embodiment includes the followingsteps.

Step S102: A mobile terminal determines whether to use multiple datachannels to transmit to-be-transmitted data.

Step S104: If determining to use the multiple data channels to transmitthe to-be-transmitted data, the mobile terminal selects at least twoactivated data channels for the to-be-transmitted data according tocurrent traffic information and service quality information that are ofthe multiple data channels.

When the to-be-transmitted data reaches a specific criterion, forexample, a data amount exceeds a specific threshold; or there is aspecific requirement for a speed of transmitting the to-be-transmitteddata; or when the mobile terminal enables a multiple-data-channeltransmission mode, it may be determined that it is necessary to use themultiple data channels of the mobile terminal to transmit theto-be-transmitted data.

The multiple data channels supported by the mobile terminal include datachannels supported by all mobile terminal cards existing in the mobileterminal, such as a WiFi, second generation (2G), third generation (3G),or fourth generation (4G) data channel. There may be one WiFi datachannel, or may be multiple different WiFi data channels.

When determining to use the multiple data channels to transmit theto-be-transmitted data, the mobile terminal may select at least twoactivated data channels for the to-be-transmitted data according to thecurrent traffic information and the service quality information that areof the multiple data channels. During implementation, the mobileterminal may first select data channels, and then activate the selecteddata channels, or may first activate data channels, and then select theactivated data channels. Persons skilled in the art may activate thedata channels in an appropriate manner, such as activating a single datachannel in a related technology; or setting an activate/deactivate flagbit for each data channel, and activating or deactivating acorresponding data channel by controlling the flag bit; or setting aunified enable/disable flag bit for the multiple-data-channeltransmission mode in a mobile terminal system, and when the flag bitindicates that the multiple-data-channel transmission mode is enabled,activating multiple data channels at the same time, or when themultiple-data-channel transmission mode is disabled, disabling all datachannels, or remaining only a default activated channel and disablingother data channels.

Current traffic information of a data channel indicates remainingavailable data traffic of the data channel, and service qualityinformation of a data channel may indicate current service quality ofthe data channel, such as a rate and signal strength. A data channelwith better service quality may be selected for the to-be-transmitteddata according to service quality information of the data channel, so asto enhance a transmission speed and transmission efficiency that are ofthe to-be-transmitted data, and appropriately allocate data channels.

Step S106: The mobile terminal uses the selected at least two datachannels to transmit the to-be-transmitted data.

After appropriate data channels are selected for the to-be-transmitteddata, data transmission may be performed at the same time by using theseselected data channels. The to-be-transmitted data may be data of oneapplication, or may be data of multiple applications.

According to this embodiment, when needing to transmit data, a mobileterminal may determine whether it is necessary to enablemultiple-data-channel transmission; when determining it is necessary toenable the multiple-data-channel transmission, the mobile terminal mayselect at least two data channels for the to-be-transmitted dataaccording to current traffic information and service quality informationthat are of the multiple data channels, so as to perform datatransmission. According to the data transmission method provided in thisembodiment, compared with using a single data channel to transmit data,using multiple data channels to transmit data at the same time greatlyenhances data transmission efficiency; in addition, use of multiple datachannels at the same time effectively avoids idleness and a waste ofdata channel resources.

Embodiment 2

Referring to FIG. 2A and FIG. 2B, FIG. 2A and FIG. 2B show a flowchartof a data transmission method according to Embodiment 2 of the presentinvention.

A mobile terminal used in this embodiment is a multi-card mobileterminal. Multiple data channels of the mobile terminal include datachannels supported by all mobile terminal cards of the mobile terminal.Based on this, the data transmission method in this embodiment includesthe following steps.

Step S202: A mobile terminal obtains information about to-be-transmitteddata, and determines, according to the information about theto-be-transmitted data, whether to use multiple data channels totransmit the to-be-transmitted data; if the mobile terminal determinesto use the multiple data channels, performs step S204; or if the mobileterminal determines not to use the multiple data channels, performs stepS212.

In this embodiment, the mobile terminal determines, according to theinformation about the to-be-transmitted data, whether to use multipledata channels to transmit the to-be-transmitted data. For example, themobile terminal determines, according to a data amount of theto-be-transmitted data, whether to use multiple data channels totransmit the to-be-transmitted data. However, as described in Embodiment1, determining, in another manner, for example, when there is a specificrequirement for a speed of the to-be-transmitted data, or the mobileterminal enables a multiple-data-channel transmission mode, whether touse the multiple data channels of the mobile terminal to transmit theto-be-transmitted data also applies to the solution of this embodiment.

Step S204: The mobile terminal determines to use multiple data channelsto transmit the to-be-transmitted data.

Step S206: The mobile terminal divides the to-be-transmitted data intomultiple data blocks according to a specified rule.

The specified rule may be appropriately set according to an actualsituation by persons skilled in the art, for example, theto-be-transmitted data is divided into multiple data blocks according toa fixed length, or the to-be-transmitted data is divided into multipledata blocks with a same length or different lengths according to a totallength of the to-be-transmitted data. This is not limited in thisembodiment of the present invention.

In this embodiment, it is assumed that the to-be-transmitted data isdivided into multiple data blocks with a same length in advanceaccording to the total length of the to-be-transmitted data. Dividingthe to-be-transmitted data into multiple data blocks according to thespecified rule before data transmission enhances data processingefficiency.

In addition, optionally, the divided multiple data blocks may form ablock set or a data block pool so as to manage the data blocks.Certainly, specific storage space may be reserved as the data block poolor the block set, and when required, the divided data blocks are storedin the storage space.

Step S208: The mobile terminal selects at least two activated datachannels for the to-be-transmitted multiple data blocks according tocurrent traffic information and service quality information that are ofthe multiple data channels.

In this step, when selecting at least two activated data channels forthe to-be-transmitted multiple data blocks, the mobile terminal mayfirst select data channels, and then activate the selected datachannels, or may first activate data channels, and then performselection on the activated data channels. When first selecting datachannels, and then activating the selected data channels, the mobileterminal may select at least two data channels for the to-be-transmitteddata according to the current traffic information and the servicequality information that are of the multiple data channels, and thenactivate the selected at least two data channels. When first activatingdata channels, and then performing selection on the activated datachannels, the mobile terminal may first activate the multiple datachannels, and then select at least two data channels for theto-be-transmitted data according to current traffic information andservice quality information that are of the activated multiple datachannels.

Preferably, after the to-be-transmitted data is divided into multipledata blocks, at least two data channels may be selected for the multipleto-be-transmitted data blocks.

During specific implementation, an optional manner is: determiningremaining traffic of each data channel in the multiple data channelsaccording to the current traffic information of the multiple datachannels; determining, according to the remaining traffic of each datachannel, data channels capable of transmitting at least one data block;and selecting at least two data channels for the to-be-transmittedmultiple data blocks according to service quality information of thedetermined data channels. Another optional manner is: determining, bythe mobile terminal according to the service quality information of themultiple data channels, data channels capable of transmitting theto-be-transmitted data blocks; and selecting at least two activated datachannels for the to-be-transmitted multiple data blocks according tocurrent traffic information of each data channel in the determined datachannels.

The service quality information of a data channel may include signalquality and a data transmission rate that are of the data channel. Inthis case, at least two data channels may be selected for theto-be-transmitted multiple data blocks according to signal quality anddata transmission rates that are of the determined data channels.

In this step, on the basis of determining that a data channel hassufficient remaining traffic, an appropriate data channel may beselected for the to-be-transmitted data according to service qualityinformation of the data channel that has sufficient data traffic, suchas signal quality and a data transmission rate. This avoids a problemthat data cannot be properly transmitted due to use of a data channelthat has insufficient remaining traffic, and a problem that datatransmission efficiency is low due to use of data channels whose signalquality is not good enough and/or whose data transmission speeds arelow. Further, when data channels are specifically allocated to theto-be-transmitted data blocks, more to-be-transmitted data blocks may beallocated to some data channels having good service quality according tothe signal quality and the data transmission rates that are of the datachannels. Accordingly, fewer to-be-transmitted data blocks are allocatedto some other data channels having relatively poor service quality. Thisenables load of data channels to be more balanced, and ensures efficientdata transmission.

Step S210: The mobile terminal uses the selected at least two datachannels to transmit the to-be-transmitted multiple data blocks.

A feasible manner of implementing this step includes: selecting, by themobile terminal, some or all of the data blocks from the multiple datablocks, and determining a currently available data channel for each ofthe selected data blocks; and establishing an HTTP (Hypertext TransferProtocol) connection on the determined data channel, and using the HTTPconnection to transmit the to-be-transmitted data block. During specificimplementation, the foregoing feasible manner may include the followingsteps.

Step S2102: Select a data block from the to-be-transmitted multiple datablocks, and determine a currently available data channel for theselected data block.

After multiple data channels used to transmit the multiple data blocksare determined, for each data block, a data channel used to transmit thedata block is determined.

Step S2104: Establish an HTTP connection on the determined data channel,and use the HTTP connection to transmit the to-be-transmitted data.

In this embodiment, the to-be-transmitted data is transmitted by usingthe HTTP connection. However, persons skilled in the art shouldunderstand that in actual use, transmission of the to-be-transmitteddata is not limited to using the HTTP connection, and anotherappropriate connection manner may also be applied.

Step S2106: Determine whether there is still a to-be-transmitted datablock; if there is no to-be-transmitted data block, this datatransmission process ends; or if there is still a to-be-transmitted datablock, determine whether there is still an available data channel; andif there is still an available data channel, go back to step S2102 andcontinue execution.

That is, it is continuously determined whether there is still a datablock that is not transmitted. If there is still a data block that isnot transmitted, it is determined whether there is still an availabledata channel. If there is still an available data channel, go back tostep S2102, that is, one data block is selected from the remainingto-be-transmitted data blocks, and an available data channel is selectedfor the selected data block; an HTTP connection is established on theselected data channel, and the HTTP connection is used to transmit theto-be-transmitted data. If there is no available data channel, personsskilled in the art may perform appropriate setting according to anactual requirement. For example, when data traffic of all data channelsis used up, data transmission is stopped, or a user is prompted whetherto perform excessive data transmission.

Therefore, in the foregoing process of this embodiment, efficient datatransmission of to-be-transmitted data in a mobile terminal isimplemented.

Step S212: If determining to use only a single data channel to transmitthe to-be-transmitted data, the mobile terminal determines whether datais currently being transmitted on a default activated channel; if nodata is currently being transmitted on the default activated channel,performs step S214; or if data is currently being transmitted on thedefault activated channel, performs step S216.

There is a setting for a default activated channel in all mobileterminals, for example, when a mobile terminal uses a WiFi connection, acurrent default activated channel of the mobile terminal is the WiFidata channel; when a mobile terminal does not use a WiFi connection, acurrent default activated channel of the mobile terminal is set by asystem in advance, for example, may be a 2G, 3G, or 4G data channel.

Step S214: If no data is currently being transmitted on the defaultactivated channel, the mobile terminal selects the default activatedchannel to transmit the to-be-transmitted data.

Step S216: If data is currently being transmitted on the defaultactivated channel, the mobile terminal determines whether datatransmission load of the default activated channel is less than a datatransmission rate of the default activated channel; and if the datatransmission load of the default activated channel is less than the datatransmission rate of the default activated channel, selects the defaultactivated channel to transmit the to-be-transmitted data; or if the datatransmission load of the default activated channel is not less than thedata transmission rate of the default activated channel, selects a datachannel that matches a service type of the to-be-transmitted data totransmit the to-be-transmitted data, and deactivates the defaultactivated channel.

If data transmission load of a data channel is less than a datatransmission rate, it may be foreseen that data that is currently beingtransmitted on the data channel is to be completely transmitted in ashort time. In this case, the data channel may be still selected toperform subsequent data transmission. Otherwise, it is necessary toselect a data channel that matches a service type of theto-be-transmitted data to transmit the to-be-transmitted data, forexample, service data of a 2G network may be transmitted on the 2G, 3G,or 4G data channel, or service data of a 3G network may be transmittedon the 3G or 4G data channel. Certainly, alternatively, the service dataof the 2G network may be transmitted on the 2G data channel, the servicedata of the 3G network may be transmitted on the 3G data channel, andservice data of a 4G network may be transmitted on the 4G data channel.At the same time, the default activated channel is deactivated, and theselected data channel that matches the service type of theto-be-transmitted data is activated so as to perform data transmission.

In this step, when a data channel that matches a service type of theto-be-transmitted data is selected to transmit the to-be-transmitteddata and the default activated channel is deactivated, a mannerincludes: determining whether the data channel that matches the servicetype of the to-be-transmitted data has remaining data traffic; if thedata channel that matches the service type of the to-be-transmitted datahas remaining data traffic, the data channel that matches the servicetype of the to-be-transmitted data is selected to transmit theto-be-transmitted data, and the default activated channel isdeactivated; or if the data channel that matches the service type of theto-be-transmitted data does not have remaining data traffic, the defaultactivated channel is still selected to transmit the to-be-transmitteddata.

In the foregoing process of this embodiment, efficient transmission ofto-be-transmitted data on multiple data channels is implemented, andeffective selection and utilization of a data channel when a single datachannel is used to transmit data are implemented, thereby enhancing adata transmission speed and data transmission efficiency.

The solution is not limited herein. On the basis of the foregoingprocess, optimization processing may be further performed on thesolution of this embodiment. The optimization processing may include oneor more of the following three cases.

Case 1: In a process of transmitting the to-be-transmitted data,processing is performed on a data channel on which a network exceptionoccurs.

A manner includes: after the to-be-transmitted data is divided intomultiple data blocks according to a specified rule, storing the dividedmultiple data blocks in a data block pool, where the data block pool isconfigured to store a data block. In this case, when it is determined,in a process of transmitting the to-be-transmitted data, that a datachannel on which a network exception occurs exists in the selected atleast one data channel, a data block that is currently being transmittedon the data channel on which a network exception occurs is re-stored inthe data block pool, and a currently available data channel isre-selected for the data block that is re-stored in the data block pool.

Case 2: In a process of transmitting the to-be-transmitted data, it isdetected whether a data channel whose data traffic is used up exists inthe selected at least one data channel; if a data channel whose datatraffic is used up exists in the selected at least one data channel, thedata channel whose data traffic is used up is stopped being used totransmit the to-be-transmitted data.

For data channels using mobile cellular data traffic, there may be datatraffic limits on these data channels. In this case, if in the processof transmitting the to-be-transmitted data, it is detected that datatraffic of a specific data channel is used up, the data channel whosedata traffic is used up is stopped being used to transmit theto-be-transmitted data, so as to reduce extra economic expenditure of auser.

Case 3: In a process of transmitting the to-be-transmitted data, atemperature of the mobile terminal is detected; if the temperature ofthe mobile terminal exceeds a set threshold, transmission of theto-be-transmitted data is stopped.

After the multiple data channels of the mobile terminal are enabled toperform data transmission, the temperature of the mobile terminal mayrise. When the temperature rises to some extent, performance of themobile terminal may be affected, and more seriously, an element in themobile terminal may be irreversibly damaged. Therefore, in actual use,an appropriate temperature threshold may be set by persons skilled inthe art, or a default system temperature threshold of a mobile terminalis used. When a temperature of the mobile terminal exceeds thethreshold, data transmission is stopped so as to protect the mobileterminal.

It should be noted that during specific execution of the foregoing threecases, there is no definite sequence between each other, or the threecases may be concurrently executed.

According to this embodiment, efficient transmission ofto-be-transmitted data on multiple data channels is implemented, anddata transmission efficiency is enhanced, thereby avoiding idleness anda waste of data channel resources. In addition, effective selection andutilization of a data channel when a single data channel is used totransmit data are further implemented, thereby enhancing a speed andefficiency of data transmission on a single data channel. Optimizationprocessing for a network exception, traffic exhaustion, and atemperature exception protects a mobile terminal, and ensures datavalidity and integrity, thereby further enhancing data transmissionefficiency.

Embodiment 3

Referring to FIG. 3 , FIG. 3 shows a flowchart of a data transmissionmethod according to Embodiment 3 of the present invention.

In this embodiment, a data transmission solution of the presentinvention is described by using an example in which a mobile terminaluploads data. The data transmission method in this embodiment includesthe following steps.

Step S302: A mobile terminal obtains data amount information ofto-be-uploaded data, determines, according to the data amountinformation, to use multiple data channels to transmit to-be-transmitteddata, and activates the multiple data channels.

In this embodiment, it is assumed that WiFi, 2G, 3G, and 4G datachannels exist in the mobile terminal, and when determining to usemultiple data channels to transmit the to-be-transmitted data, themobile terminal activates the multiple data channels. It is assumed thata data amount of the to-be-uploaded data is 600 M, and all the foregoingfour data channels can upload data. The mobile terminal determines touse the four data channels at the same time to upload the data andactivates the four data channels.

Step S304: The mobile terminal divides the to-be-uploaded data intomultiple data blocks.

In this embodiment, it is assumed that the 600 M to-be-uploaded data isdivided into six data blocks. A data amount of each data block is 100 M.

Step S306: The mobile terminal determines remaining traffic of each datachannel according to current traffic information of each data channel inthe multiple data channels; and determines, according to the remainingtraffic of each data channel, data channels capable of transmitting atleast one data block.

In this embodiment, it is assumed that the WiFi data channel imposes nolimitation on data traffic, and initial data traffic of the 2G, 3G, and4G data channels is 200 M. Current traffic of the 2G, 3G, and 4G datachannels is respectively 90 M, 70 M, and 600 M. It can be learned thatall the data channels have remaining traffic, and the remaining trafficis greater than a data amount of a single data block. Therefore, all thedata channels are available data channels.

Step S308: The mobile terminal selects at least two data channels forthe to-be-uploaded multiple data blocks according to service qualityinformation of the determined data channels.

In this embodiment, the service quality information includes signalstrength and a data transmission rate. It is assumed that the datachannels ranking in descending order of signal strength aresuccessively: the WiFi data channel, the 4G data channel, the 3G datachannel, and the 2G data channel; similarly, the data channels rankingin descending order of a data transmission rate are successively: theWiFi data channel, the 4G data channel, the 3G data channel, and the 2Gdata channel. In actual use, if signal strength of a specific datachannel is not suitable for data transmission, or a data transmissionrate is relatively low, using this data channel to transmit data may beexcluded. Otherwise, if signal strength of a data channel is suitablefor data transmission, or a data transmission rate is not relatively lowthe data channel may be used to transmit data. In this embodiment, it isassumed that all the four data channels may be used to upload data.

Step S310: The mobile terminal uses the selected data channels to uploadthe to-be-uploaded data blocks.

In this step, the mobile terminal may upload four of the six data blocksby using the WiFi data channel, the 4G data channel, the 3G datachannel, and the 2G data channel at the same time. For the remaining twodata blocks, because data transmission rates of data channels aredifferent, one may be transmitted on a specific data channel, and thenthe remaining data block is continuously transmitted. For example, it isassumed that a data transmission rate of the WiFi data channel is 25M/S, a data transmission rate of the 4G data channel is 20 M/S, a datatransmission rate of the 3G data channel is 10 M/S, and a datatransmission rate of the 2G data channel is 5 M/S. In this case, for a100 M data block, time required for uploading on the WiFi data channelis 4 S, time required for uploading on the 4G data channel is 5 S, timerequired for uploading on the 3 G data channel is 10 S, and timerequired for uploading on the 2G data channel is 20 S. In this case, oneof the remaining two data blocks may be uploaded by using the WiFi datachannel, and the other may be uploaded by using the 4G data channel.

Step S312: A server receives the data blocks uploaded by the mobileterminal, and combines the uploaded data blocks to form complete data.

In this step, any appropriate related technology may be used toimplement processing on the multiple uploaded data blocks performed bythe server, for example, according to a data block identifier, or packetheader information. This is not limited in this embodiment of thepresent invention.

According to this embodiment, simultaneous uploading of data by a mobileterminal by using multiple data channels is implemented, and datatransmission efficiency is enhanced, thereby avoiding idleness and awaste of data channel resources.

Embodiment 4

Referring to FIG. 4A and FIG. 4B, FIG. 4A and FIG. 4B show a flowchartof a data transmission method according to Embodiment 4 of the presentinvention.

In this embodiment, a data transmission solution of the presentinvention is described by using an example in which a mobile terminaldownloads data, and specifically, the mobile terminal downloads a file.The data transmission method in this embodiment includes the followingsteps.

Step S402: A mobile terminal receives a service request of downloading afile.

The service request carries information about a to-be-downloaded file,including information about a data amount of the to-be-downloaded file.

Step S404: The mobile terminal determines, according to a data amount ofa to-be-downloaded file, whether to enable multiple data channels todownload the to-be-downloaded file. If the mobile terminal determines toenable the multiple data channels, performs step S406; or if the mobileterminal determines not to enable the multiple data channels, performsstep S420.

For example, the mobile terminal determines whether the data amount ofthe to-be-downloaded file is greater than M. M may be appropriately setby persons skilled in the art according to an actual requirement. Whenthe data amount of the to-be-downloaded file is greater than M,concurrent downloading is enabled, and the multiple data channels of themobile terminal are used to download data; otherwise, when the dataamount of the to-be-downloaded file is not greater than M, concurrentdownloading is not enabled.

Step S406: The mobile terminal determines whether remaining traffic ofan i^(th) data channel meets a requirement for downloading theto-be-downloaded file. If the remaining traffic of the i^(th) datachannel meets the requirement, performs step S408; or if the remainingtraffic of the i^(th) data channel does not meet the requirement,performs step S416.

1≤i≤N, that is, i is a positive integer greater than or equal to 1, andless than or equal to a quantity N of all data channels supported by allmobile terminal cards existing in the mobile terminal. An initial valueof i is 1. By using i to indicate a sequence number of a data channel,cyclic determining and data processing may be performed on multiple datachannels of the mobile terminal.

Step S408: The mobile terminal activates the i^(th) data channel.

Step S410: The mobile terminal determines whether signal quality of thei^(th) data channel meets a requirement for downloading theto-be-downloaded file. If the signal quality of the i^(th) data channelmeets the requirement, performs step S412; or if the signal quality ofthe i^(th) data channel does not meet the requirement, performs stepS416.

In this embodiment, the signal quality includes one or more of QoSparameters such as signal strength, a signal-to-noise ratio, and signalstability. For example, when signal strength of an LTE network isgreater than −110 dbm, it is considered that signal quality of the datachannel meets the requirement for downloading the to-be-downloaded file.For another example, when signal strength of a WCDMA network is greaterthan −90 dbm, it is considered that signal quality of the data channelmeets the requirement for downloading the to-be-downloaded file. Forstill another example, when signal strength of a GSM network is greaterthan −90 dbm, it is considered that signal quality of the data channelmeets the requirement for downloading the to-be-downloaded file. This isnot limited in this embodiment of the present invention.

Step S412: The mobile terminal determines whether a data transmissionrate of the i^(th) data channel meets a requirement for downloading theto-be-downloaded file. If the data transmission rate of the i^(th) datachannel meets the requirement, performs step S414; or if the datatransmission rate of the i^(th) data channel does not meet therequirement, performs step S416.

In this embodiment, the data transmission rate refers to a downloadingrate of a data channel. For example, when a downloading rate of the longterm evolution (LTE) network is less than 200 Kb/s, it is consideredthat a data transmission rate of the data channel does not meet therequirement for downloading the to-be-downloaded file. For anotherexample, when a downloading rate of the wideband code division multipleaccess (WCDMA) network is less than 50 Kb/s, it is considered that adata transmission rate of the data channel does not meet the requirementfor downloading the to-be-downloaded file. For still another example,when a downloading rate of the global system for mobile communications(GSM) network is less than 10 Kb/s, it is considered that a datatransmission rate of the data channel does not meet the requirement fordownloading the to-be-downloaded file. This is not limited in thisembodiment of the present invention.

Step S414: The mobile terminal determines whether i reaches a largestquantity of data channels. If i reaches a largest quantity of datachannels, performs step S418; or if i does not reach a largest quantityof data channels, performs step S416.

That is, the mobile terminal determines whether i reaches N.

Step S416: If i=i+1, go back to step S406.

In this embodiment, a meaning of i=i+1 is the same as a meaning innormal program design, and may be understood as: i is considered as avariable, and a value obtained each time is equal to i plus 1.

Step S418: The mobile terminal allocates a data channel to theto-be-downloaded file, and then performs step S426.

In this embodiment, a process of allocating a data channel to theto-be-downloaded file by the mobile terminal is shown in FIG. 5A andFIG. 5B. The process includes the following steps.

Step S41802: Initialization of a concurrency engine is completed.

In this embodiment, the concurrency engine is used to activate multipledata channels. That the initialization of a concurrency engine iscompleted means that the multiple data channels have been activated. Aspecific implementation form of the concurrency engine may beimplemented by persons skilled in the art according to an actualsituation. This is not limited in this embodiment of the presentinvention.

Step S41804: Divide the to-be-downloaded file into multiple data blocksaccording to an algorithmic rule, so as to form a “block set.”

For example, for downloading a to-be-downloaded file of a 4G servicetype from a 4G data channel, a feasible division manner is as follows.

(1) If 20 MB≤SIZE≤(100 MB−1), the to-be-downloaded file is divided intosix blocks.

(2) If 100 MB≤SIZE≤(200 MB−1), the to-be-downloaded file is divided intoeight blocks.

(3) If 200 MB≤SIZE≤(300 MB−1), the to-be-downloaded file is divided intoten blocks.

(4) If 300 MB≤SIZE, the to-be-downloaded file is divided into multipleblocks, and each block is always 30 MB.

For another example, for downloading a to-be-downloaded file of a 2Gservice type from a 2G data channel, a feasible division manner is asfollows.

(1) If 2 MB≤SIZE≤(10 MB−1), the to-be-downloaded file is divided intosix blocks.

(2) If 10 MB≤SIZE≤(20 MB−1), the to-be-downloaded file is divided intoeight blocks.

(3) If 20 MB≤SIZE≤(30 MB−1), the to-be-downloaded file is divided intoten blocks.

(4) If 30 MB≤SIZE, the to-be-downloaded file is divided into multipleblocks, and each block is always 3 MB.

It should be noted that all the foregoing division manners are examples.In an actual application, persons skilled in the art may perform anyappropriate division according to an actual situation, includingdivision of the data block and division of a range of the data amount.This is not limited in this embodiment of the present invention.

Step S41806: For each data channel in the multiple data channels, createa new thread, which is used to enable a downloading engine of the datachannel.

In this embodiment, the downloading engine is used to download theto-be-downloaded file. A specific implementation form of the downloadingengine may be implemented by persons skilled in the art in anyappropriate manner according to an actual situation. This is not limitedin this embodiment of the present invention.

Step S41808: Obtain, from the “block set,” a data block that is notdownloaded.

Step S41810: Determine whether there is no downloadable data block. Ifthere is no downloadable data block, perform step S41820; or if there isa downloadable data block, perform step S41812.

Step S41812: Determine whether data traffic of this data channel is usedup. If the data traffic of this data channel is used up, perform stepS41820; or if the data traffic of this data channel is not used up,perform step S41814.

Step S41814: Establish HTTP connection on this data channel, and send anHTTP request and start to download the obtained data block.

In this embodiment, the HTTP connection may be established by adownloading engine of each data channel, for example, a downloadingengine of a data channel 1 establishes an HTTP connection of the datachannel 1 on a network interface of the data channel 1; and adownloading engine of a data channel 2 establishes an HTTP connection ofthe data channel 2 on a network interface of the data channel 2. Byanalogy, a downloading engine of a data channel N establishes an HTTPconnection of the data channel N on a network interface of the datachannel N.

Step S41816: Determine whether a network exception occurs and adata-block-downloading failure is caused. If a network exception occursand a data-block-downloading failure is caused, perform step S41818; orif a network exception does not occur and no data-block-downloadingfailure is caused, go back to step S41808.

Step S41818: Add a data block that fails to be downloaded back into the“block set,” so that a downloading engine of another available datachannel performs downloading.

Step S41820: Terminate the downloading engine of this data channel.

After all data channels complete downloading of corresponding datablocks, the process goes to step S426.

Step S420: The mobile terminal selects a data channel for theto-be-downloaded file.

In this embodiment, a process of selecting a data channel for theto-be-downloaded file by the mobile terminal is shown in FIG. 6A andFIG. 6B. The process includes the following steps.

Step S42002: Determine whether a default activated channel has aservice. If the default activated channel has a service, perform stepS42004; or if the default activated channel does not have a service,perform step S42016.

That is, it is determined whether data is currently being transmitted onthe default activated channel.

Step S42004: Determine whether data transmission load of the defaultactivated channel is less than a data transmission rate. If the datatransmission load of the default activated channel is less than the datatransmission rate, perform step S42016; or if the data transmission loadof the default activated channel is not less than the data transmissionrate, perform step S42006.

Step S42006: Determine whether the i^(th) data channel matches a servicetype of the to-be-downloaded file. If the i^(th) data channel matchesthe service type of the to-be-downloaded file, perform step S42008; orif the i^(th) data channel does not match the service type of theto-be-downloaded file, perform step S42010.

Step S42008: Determine whether remaining traffic of the i^(th) datachannel meets a requirement for downloading the to-be-downloaded file.If the remaining traffic meets the requirement, perform step S42014; orif the remaining traffic does not meet the requirement, perform stepS42010.

Step S42010: If i=i+1, perform step S42012.

Step S42012: Determine whether i reaches the largest quantity of datachannels. If i reaches the largest quantity of data channels, performstep S42006; or if i does not reach the largest quantity of datachannels, perform step S42016.

That is, it is determined whether i reaches N.

Step S42014: Select the i^(th) data channel, and perform step S422.

Step S42016: Select the default activated channel, and perform stepS422.

Step S422: The mobile terminal determines whether the data channelselected for the to-be-downloaded file is activated. If the data channelis activated, the data channel is used to download the file, andperforms step S426; or if the data channel is not activated, performsstep S424.

Step S424: The mobile terminal activates the data channel selected forthe to-be-downloaded file, uses the data channel to download the file,and performs step S426.

Step S426: The mobile terminal completes downloading of theto-be-downloaded file.

Step S428: The mobile terminal disables the multiple data channels.

According to this embodiment, downloading of to-be-downloaded data onmultiple data channels is implemented, and data downloading efficiencyis enhanced, thereby avoiding idleness and a waste of data channelresources. In addition, intelligent selection of a data channel when asingle data channel is used to download data is implemented, therebyenhancing the data downloading efficiency.

Embodiment 5

Referring to FIG. 7 , FIG. 7 shows a structural block diagram of a datatransmission apparatus according to Embodiment 5 of the presentinvention.

The data transmission apparatus in this embodiment is disposed in amobile terminal, where the data transmission apparatus includes: adetermining module 502, configured to determine whether to use multipledata channels to transmit to-be-transmitted data; a selection module504, configured to: if a determining result of the determining module500 is determining to use the multiple data channels to transmit theto-be-transmitted data, select at least two activated data channels forthe to-be-transmitted data according to current traffic information andservice quality information that are of the multiple data channels; anda transmission module 506, configured to use the selected at least twodata channels to transmit the to-be-transmitted data.

The data transmission apparatus in this embodiment is configured toimplement a corresponding data transmission method in the foregoingmultiple method embodiments. According to this embodiment, the datatransmission apparatus disposed in a mobile terminal may determinewhether it is necessary to enable multiple-data-channel transmission;when determining that it is necessary to enable themultiple-data-channel transmission, the data transmission apparatus mayselect at least two data channels for to-be-transmitted data accordingto current traffic information and service quality information that areof the multiple data channels, so as to perform data transmission.According to the data transmission method provided in this embodiment,compared with using a single data channel to transmit data, usingmultiple data channels to transmit data at the same time greatlyenhances data transmission efficiency; in addition, use of multiple datachannels at the same time effectively avoids idleness and a waste ofdata channel resources.

Embodiment 6

Referring to FIG. 8 , FIG. 8 shows a structural block diagram of a datatransmission apparatus according to Embodiment 6 of the presentinvention.

The data transmission apparatus in this embodiment is a datatransmission apparatus obtained by optimizing a data transmissionapparatus in Embodiment 5 in multiple aspects. The optimized datatransmission apparatus includes a determining module 502, a selectionmodule 504, and a transmission module 506 that are in Embodiment 5. Onthis basis, preferably, the selection module 504 includes: a firstselection module 5042, configured to select at least two data channelsfor the to-be-transmitted data according to the current trafficinformation and the service quality information that are of the multipledata channels, and activate the selected at least two data channels; ora second selection module 5044, configured to activate the multiple datachannels; and select at least two data channels for theto-be-transmitted data according to current traffic information andservice quality information that are of the activated multiple datachannels.

Preferably, the data transmission apparatus in this embodiment furtherincludes: a division module 508, configured to: before the selectionmodule 504 selects at least one data channel for the to-be-transmitteddata according to the current traffic information and the servicequality information that are of the multiple data channels, divide theto-be-transmitted data into multiple data blocks according to aspecified rule. In this case, the selection module 504 is configured toselect at least two data channels for the to-be-transmitted multipledata blocks according to the current traffic information and the servicequality information that are of the multiple data channels.

In this case, preferably, the selection module 504 includes: a firstdetermining module 5046, configured to determine remaining traffic ofeach data channel in the multiple data channels according to the currenttraffic information of the multiple data channels; a second determiningmodule 5048, configured to determine, according to the remaining trafficof each data channel, data channels capable of transmitting at least onedata block; and a first channel selection module 50410, configured toselect at least two data channels for the to-be-transmitted multipledata blocks according to service quality information of the determineddata channels. Alternatively, the selection module 504 includes: a thirddetermining module 50412, configured to determine data channels capableof transmitting the to-be-transmitted data blocks according to theservice quality information of the multiple data channels; and a secondchannel selection module 50414, configured to select at least twoactivated data channels for the to-be-transmitted multiple data blocksaccording to current traffic information of each data channel in thedetermined data channels.

Preferably, the service quality information includes: signal quality anda data transmission rate.

Preferably, the transmission module 506 is configured to select a datablock from the multiple data blocks, and determine a currently availabledata channel for the selected data block; and establish an HTTPconnection on the determined data channel, and use the HTTP connectionto transmit the to-be-transmitted data block.

Preferably, the data transmission apparatus in this embodiment furtherincludes: a storage module 510, configured to: after the division module508 divides the to-be-transmitted data into multiple data blocksaccording to a specified rule, store the divided multiple data blocks ina data block pool, where the data block pool is configured to store adata block; and an exception handling module 512, configured todetermine, in a process of transmitting the to-be-transmitted data, thata data channel on which a network exception occurs exists in theselected at least two data channels; and re-store, in the data blockpool, a data block that is currently being transmitted on the datachannel on which a network exception occurs, and re-select a currentlyavailable data channel for the data block that is re-stored in the datablock pool.

Preferably, the data transmission apparatus in this embodiment furtherincludes: a single-channel determining module 514, configured to: if thedetermining result of the determining module 502 is determining to useonly a single data channel to transmit the to-be-transmitted data,determine whether data is currently being transmitted on a defaultactivated channel; a second execution module 516, configured to: if nodata is currently being transmitted on the default activated channel,select the default activated channel to transmit the to-be-transmitteddata; and a third execution module 518, configured to: if data iscurrently being transmitted on the default activated channel, determinewhether data transmission load of the default activated channel is lessthan a data transmission rate of the default activated channel; and ifthe data transmission load of the default activated channel is less thanthe data transmission rate of the default activated channel, select thedefault activated channel to transmit the to-be-transmitted data; or ifthe data transmission load of the default activated channel is not lessthan the data transmission rate of the default activated channel, selecta data channel that matches a service type of the to-be-transmitted datato transmit the to-be-transmitted data, and deactivate the defaultactivated channel.

Preferably, when selecting the data channel that matches the servicetype of the to-be-transmitted data to transmit the to-be-transmitteddata, and deactivating the default activated channel, the thirdexecution module 518 is configured to: determine whether the datachannel that matches the service type of the to-be-transmitted data hasremaining data traffic; and if the data channel that matches the servicetype of the to-be-transmitted data has remaining data traffic, selectthe data channel that matches the service type of the to-be-transmitteddata to transmit the to-be-transmitted data, and deactivate the defaultactivated channel; or if the data channel that matches the service typeof the to-be-transmitted data does not have remaining data traffic,select the default activated channel to transmit the to-be-transmitteddata.

Preferably, the data transmission apparatus in this embodiment furtherincludes: a first stopping module 520, configured to detect whether adata channel whose data traffic is used up exists in the selected atleast two data channels; and if a data channel whose data traffic isused up exists in the selected at least two data channels, stop usingthe data channel whose data traffic is used up to transmit theto-be-transmitted data.

Preferably, the data transmission apparatus in this embodiment furtherincludes: a second stopping module 522, configured to detect atemperature of the mobile terminal in the process of transmitting theto-be-transmitted data; and if the temperature of the mobile terminalexceeds a set threshold, stop transmission of the to-be-transmitteddata.

Preferably, the mobile terminal in this embodiment is a multi-cardmobile terminal, and the multiple data channels of the mobile terminalinclude data channels supported by all mobile terminal cards of themobile terminal.

The data transmission apparatus in this embodiment is configured toimplement a corresponding data transmission method in the foregoingmultiple method embodiments, and has beneficial effects of acorresponding method embodiment. Details are not described herein.

Embodiment 7

This embodiment of the present invention further provides a processor.The processor may be a central processing unit (CPU for short), or maybe another general purpose processor, a digital signal processor (DSP),an application-specific integrated circuit (ASIC), a field programmablegate array (FPGA) or another programmable logical device, a discretegate or transistor logic device, a discrete hardware assembly, or thelike. The general purpose processor may be a microprocessor or may beany conventional processor, or the like.

The processor is disposed in a mobile terminal, and the processor isconfigured to execute the following operations: determining whether touse multiple data channels to transmit to-be-transmitted data; ifdetermining to use the multiple data channels to transmit theto-be-transmitted data, selecting at least two activated data channelsfor the to-be-transmitted data according to current traffic informationand service quality information that are of the multiple data channels;and using the selected at least two data channels to transmit theto-be-transmitted data.

Preferably, the step of selecting at least two activated data channelsfor the to-be-transmitted data according to current traffic informationand service quality information that are of the multiple data channelsincludes: selecting at least two data channels for the to-be-transmitteddata according to the current traffic information and the servicequality information that are of the multiple data channels, andactivating the selected at least two data channels; or activating themultiple data channels; and selecting at least two data channels for theto-be-transmitted data according to current traffic information andservice quality information that are of the activated multiple datachannels.

Preferably, before the step of selecting at least two activated datachannels for the to-be-transmitted data according to current trafficinformation and service quality information that are of the multipledata channels, the processor is further configured to execute thefollowing operation: dividing the to-be-transmitted data into multipledata blocks according to a specified rule; and the step of selecting atleast two activated data channels for the to-be-transmitted dataaccording to the current traffic information and the service qualityinformation that are of the multiple data channels includes: selectingat least two activated data channels for the to-be-transmitted multipledata blocks according to current traffic information and service qualityinformation that are of each data channel in the multiple data channels.

Preferably, the step of selecting at least two activated data channelsfor the to-be-transmitted data according to current traffic informationand service quality information that are of the multiple data channelsincludes: determining remaining traffic of each data channel in themultiple data channels according to the current traffic information ofthe multiple data channels; determining, according to the remainingtraffic of each data channel, data channels capable of transmitting atleast one data block; and selecting at least two activated data channelsfor the to-be-transmitted multiple data blocks according to servicequality information of the determined data channels.

Preferably, the step of selecting at least two activated data channelsfor the to-be-transmitted data according to current traffic informationand service quality information that are of the multiple data channelsincludes: determining data channels capable of transmitting theto-be-transmitted data blocks according to the service qualityinformation of the multiple data channels; and selecting at least twoactivated data channels for the to-be-transmitted multiple data blocksaccording to current traffic information of each data channel in thedetermined data channels.

Preferably, the service quality information includes: signal quality anda data transmission rate.

Preferably, the step of using the selected at least two data channels totransmit the to-be-transmitted data includes: selecting some or all ofthe data blocks from the multiple data blocks, and determining acurrently available data channel for each of the selected data blocks;and establishing an HTTP connection on the determined data channel, andusing the HTTP connection to transmit the to-be-transmitted data block.

Preferably, after the step of dividing the to-be-transmitted data intomultiple data blocks according to a specified rule, the processor isfurther configured to execute the following operation: storing thedivided multiple data blocks in a data block pool, where the data blockpool is configured to store a data block; and the processor is furtherconfigured to execute the following operation: determining, in a processof transmitting the to-be-transmitted data, that a data channel on whicha network exception occurs exists in the selected at least two datachannels; and re-storing, in the data block pool, a data block that iscurrently being transmitted on the data channel on which a networkexception occurs, and re-selecting a currently available data channelfor the data block that is re-stored in the data block pool.

Preferably, the processor is further configured to execute the followingoperations: if it is determined to use only a single data channel totransmit the to-be-transmitted data, determining whether data iscurrently being transmitted on a default activated channel; if no datais currently being transmitted on the default activated channel,selecting the default activated channel to transmit theto-be-transmitted data; and if data is currently being transmitted onthe default activated channel, determining whether data transmissionload of the default activated channel is less than a data transmissionrate of the default activated channel; and if the data transmission loadof the default activated channel is less than the data transmission rateof the default activated channel, selecting the default activatedchannel to transmit the to-be-transmitted data; or if the datatransmission load of the default activated channel is not less than thedata transmission rate of the default activated channel, selecting adata channel that matches a service type of the to-be-transmitted datato transmit the to-be-transmitted data, and deactivating the defaultactivated channel.

Preferably, the step of selecting a data channel that matches a servicetype of the to-be-transmitted data to transmit the to-be-transmitteddata, and deactivating the default activated channel includes:determining whether the data channel that matches the service type ofthe to-be-transmitted data has remaining data traffic; if the datachannel that matches the service type of the to-be-transmitted data hasremaining data traffic, selecting the data channel that matches theservice type of the to-be-transmitted data to transmit theto-be-transmitted data, and deactivating the default activated channel;or if the data channel that matches the service type of theto-be-transmitted data does not have remaining data traffic, selectingthe default activated channel to transmit the to-be-transmitted data.

Preferably, the processor is further configured to execute the followingoperations: detecting whether a data channel whose data traffic is usedup exists in the selected at least two data channels; and if a datachannel whose data traffic is used up exists in the selected at leasttwo data channels, stopping using the data channel whose data traffic isused up to transmit the to-be-transmitted data.

Preferably, the processor is further configured to execute the followingoperations: detecting a temperature of the mobile terminal in theprocess of transmitting the to-be-transmitted data; and if thetemperature of the mobile terminal exceeds a set threshold, stoppingtransmission of the to-be-transmitted data.

Preferably, the mobile terminal is a multi-card mobile terminal, and themultiple data channels of the mobile terminal include data channelssupported by all mobile terminal cards of the mobile terminal.

The processor in this embodiment is configured to implement acorresponding data transmission method in the foregoing multiple methodembodiments, and has beneficial effects of a corresponding methodembodiment. Details are not described herein.

Embodiment 8

Referring to FIG. 9 , FIG. 9 shows a schematic structural diagram of amobile terminal according to Embodiment 8 of the present invention.

The mobile terminal in this embodiment includes: a memory 602, atransceiver 604, the processor 606 in Embodiment 7, and a bus 608. Thememory 602, the transceiver 604, and the processor 606 performcommunication by using the bus 608.

The memory 602 is configured to store an instruction; the processor 606is configured to execute, according to the instruction stored in thememory 602, an operation executed by the processor in Embodiment 7; andthe transceiver 604 is configured to receive or send to-be-transmitteddata according to the operation executed by the processor 606.

The memory 602 may be configured to store an instruction and a softwareprogram, and the processor 606 executes various functional applicationsof the mobile terminal and implements data processing, by running theinstruction and the software program that are stored in the memory 602.In a specific implementation manner of the present invention, the memory602 may include a volatile memory, such as a nonvolatile random accessmemory (NVRAM for short), a phase change random access memory (PRAM forshort), or a magnetoresistive random access memory (MRAM for short), andmay further include a non-volatile memory, such as at least one magneticdisk storage device, an electrically erasable programmable read-onlymemory (EEPROM for short), or a flash memory device such as an NOR flashmemory or an NAND flash memory. The non-volatile memory stores aninstruction executed by the processor 606. The processor 606 loads, fromthe non-volatile memory, a running instruction and data to a memory, andstores digital content in a massive storage apparatus.

The processor 606 is a control center of the mobile terminal and usesvarious interfaces and lines to connect all parts of the entire mobileterminal. The processor 606 executes various functions of the mobileterminal and/or processes data, by running or executing the instructionand/or the software program that are/is stored in the memory 602. Theprocessor 606 may be formed by an integrated circuit (IC for short), forexample, may be formed by a singly-encapsulated IC, or may be formed bymultiple connected encapsulated ICs with a same function or differentfunctions. For example, the processor 606 may include only a centralprocessing unit (CPU for short), or may be a combination of a graphicsprocessing unit (GPU), a digital signal processor (DSP for short), and acontrol chip (for example, a baseband chip) in a communications unit. Inan implementation manner of the present invention, the CPU may be asingle computing core, or may include multiple computing cores.

In a processing procedure, the processor 606 may transmit information,and receive or send to-be-transmitted data with help of the transceiver604, the bus 608, and a necessary auxiliary circuit (such as anantenna).

The mobile terminal in this embodiment is configured to implement acorresponding data transmission method in the foregoing multiple methodembodiments, and has beneficial effects of a corresponding methodembodiment. Details are not described herein.

Embodiments in this specification are all described in a progressivemanner. Each embodiment focuses on a difference from other embodiments,and for same or similar parts in the embodiments, reference may be madeto these embodiments. A mobile terminal embodiment is describedrelatively simply because it is basically similar to method embodiments,and for portions related to those of the method embodiments, referencemay be made to the description of the method embodiments.

Algorithms and displays that are provided herein are not inherentlyassociated with any specific mobile terminal, virtual system, or anotherdevice. Various general purpose systems may also be used together withthe teaching based on these embodiments. According to the foregoingdescriptions, a structure required to construct a system of this type isobvious. In addition, the present invention is not designed for anyspecific programming language. It should be understood that content ofthe present invention described herein may be implemented by usingvarious programming languages, and the foregoing description made forthe specific language is intended to disclose examples of implementationmanners of the present invention.

A large quantity of details are described in the specification providedherein. However, it can be understood that the embodiments of thepresent invention may be practiced without these details. Detaileddescriptions of a well-known method, structure, and technology areomitted in some embodiments in order not to blur understanding of thisspecification.

Similarly, it should be understood that, to streamline this disclosureand help understand one or more of the various aspects of the invention,in the foregoing descriptions of embodiments of the present inventionmade for illustration purposes, various features of the presentinvention are sometimes grouped into a single embodiment, a drawing, ortheir respective descriptions. However, a way of disclosing should notbe interpreted as reflecting the following intention: the contemplatedpresent invention requires more features than those clearly disclosed ineach claim. More accurately, as reflected in the claims below, theaspects of invention are less than all features of a single embodimentthat is previously disclosed. Therefore, the claims that follow aspecific implementation manner definitely incorporate the specificimplementation manner. Each claim serves as a separate embodiment of thepresent invention.

Persons skilled in the art may understand that modules in devices in theembodiments may be adaptively changed and be disposed in one or moredevices that are different from those of these embodiments. Modules orunits or components in the embodiments may be combined into a module ora unit or a component, and additionally, may be divided into a pluralityof submodules or subunits or subcomponents. Except a fact that at leastsome of these features and/or processes or units are mutually exclusive,all disclosed features and all processes or units of any method ordevice that are disclosed in such a way in this specification (includingthe appended claims, the abstract, and the accompanying drawings) may becombined in any combination mode. Unless otherwise explicitly stated,each feature disclosed in this specification (including the appendedclaims, the abstract, and the accompanying drawings) may be replaced byan alternative feature that serves same, equivalent, or similarpurposes.

In addition, persons skilled in the art can understand that, althoughsome embodiments described herein include some features included inanother embodiment instead of including another feature, a combinationof features of different embodiments means falling within the scope ofthe present invention and forming different embodiments. For example, inthe following claims, any one of the contemplated embodiments may beused in any combination mode.

Embodiments of various parts in the present invention may be implementedby hardware, or software modules running on one or more processors, or acombination thereof. Persons skilled in the art should understand thatin practice, a microprocessor or a digital signal processor (DSP) may beconfigured to implement some or all functions of some or all parts in adevice that is searched according to the embodiments of the presentinvention. The present invention may further be implemented as a part orall of devices or device programs (such as a computer program and acomputer program product) configured to perform the methods describedherein. The programs implementing the present invention may be stored ina computer-readable medium, or may have one or more forms of signals.Such signals may be downloaded from an Internet site, or provided on acarrier signal, or provided in any other form.

For example, FIG. 10 shows a mobile terminal, such as a mobile phone,that may implement a method that is searched according to the presentinvention. The mobile terminal conventionally includes a processor 910and a computer program product or a computer-readable medium that is ina form of a memory 920. The memory 920 may be an electronic memory suchas a flash memory, an EEPROM (electrically erasable programmableread-only memory), an EPROM, a hard disk, or a read only memory (ROM).The memory 920 has storage space 930 of program code 931 that is used toexecute any method step in the foregoing methods. For example, thestorage space 930 used to store the program code may include programcode 931 that is used to implement steps in the foregoing methods. Theprogram code may be read from one or more computer program products orwritten into the one or more computer program products. These computerprogram products include a program code carrier such as a hard disk, acompact disk (CD), a memory card, or a floppy disk. Such a computerprogram product is generally a portable or fixed storage unit, as shownin FIG. 11 . The storage unit may have a storage section, storage space,and like that are similar to those arranged in the memory 920 in aserver in FIG. 10 . The program code may be compressed in an appropriateform. Generally, the storage unit includes computer-readable code 931′,that is, code that may be read by a processor such as the processor 910.When the code is executed by the server, the server performs varioussteps in the methods described above.

The “one embodiment,” “embodiment,” or “one or more embodiments”mentioned in this specification means that a specific characteristic,structure, or feature described with reference to an embodiment isincluded in at least one embodiment of the present invention. Inaddition, it should be noted that a phrase like “in one embodiment”herein may not all refer to a same embodiment.

A large quantity of details are described in the specification providedherein. However, it can be understood that the embodiments of thepresent invention may be practiced without these details. Detaileddescriptions of a well-known method, structure, and technology areomitted in some embodiments in order not to blur understanding of thisspecification. It should be noted that the foregoing embodiments areintended for describing the present invention, instead of limiting thepresent invention, and persons skilled in the art may design analternative embodiment without departing from the scope of the appendedclaims. In the claims, any reference symbol between the brackets shallnot constitute any limitation on the claims. The word “comprise” doesnot exclude existence of an element or a step that is not listed in theclaims. The word “a/an” or “one” preceding an element does not excludeexistence of multiple such elements. The present invention may beimplemented by hardware including several different elements and acomputer that is appropriately programmed. In unit claims that listseveral apparatuses, some of the apparatuses may be specificallyimplemented by a same hardware item. Use of words first, second, third,and the like does not indicate any sequence. These words may beinterpreted as names.

In addition, it should be further noted that the language used in thisspecification is merely selected for a purpose of readability andteaching, but not for explaining or limiting the subject of the presentinvention. Therefore, many modifications and variations are obvious topersons of ordinary skill in the art without departing from the scopeand spirit of the appended claims. For the scope of the presentinvention, the disclosure of the present invention is illustrative,rather than limited, and the scope of the present invention is subjectto the appended claims.

What is claimed is:
 1. A method, comprising: determining, by a mobileterminal, to use multiple data channels to transmit to-be-transmitteddata to a network-side device, wherein the to-be-transmitted data isdata of one application; dividing, by the mobile terminal, theto-be-transmitted data into multiple data blocks according to a rule;determining, by the mobile terminal, current traffic information andservice quality information of at least one of the multiple datachannels; selecting, by the mobile terminal, at least two activated datachannels of the multiple data channels to use to transmit theto-be-transmitted multiple data blocks according to the service qualityinformation of the at least one of the multiple data channels; andusing, by the mobile terminal, the selected at least two activated datachannels to transmit the to-be-transmitted data to the network-sidedevice, wherein using the selected at least two activated data channelscomprises matching data blocks of the multiple data blocks to the atleast two activated data channels based on the service qualityinformation of the at least one of the multiple data channels.
 2. Themethod according to claim 1, further comprising: activating, by themobile terminal, at least two of the multiple data channels, to form theat least two activated data channels.
 3. The method according to claim1, wherein the service quality information of the at least one of themultiple data channels comprises: signal quality of the at least one ofthe multiple data channels; and a data transmission rate of the at leastone of the multiple data channels.
 4. The method according to claim 1,wherein the mobile terminal comprises at least one mobile terminal card,and the at least two activated data channels comprise a data channelsupported by the at least one mobile terminal card.
 5. The methodaccording to claim 1, further comprising: detecting, by the mobileterminal, whether a data channel whose data traffic is used up exists inthe selected at least two activated data channels; and in response todetecting that a data channel whose data traffic is used up exists inthe selected at least two activated data channels, stopping using thedata channel whose data traffic is used up to transmit theto-be-transmitted data.
 6. The method according to claim 1, whereinusing, by the mobile terminal, the selected at least two activated datachannels to transmit the to-be-transmitted data to the network-sidedevice further comprises: using, by the mobile terminal, the selected atleast two activated data channels to simultaneously transmit theto-be-transmitted data to the network-side device, wherein the multipledata blocks are matched to the at least two activated data channelsbased on transmission rates of the at least two activated data channels.7. The method according to claim 1, wherein determining, by the mobileterminal, to use multiple data channels to transmit to-be-transmitteddata to the network-side device comprises: determining, by a mobileterminal, to use multiple data channels to transmit to-be-transmitteddata to a network-side device in response to a multi-data channeltransmission mode of the mobile terminal being activated.
 8. The methodaccording to claim 1, wherein determining, by the mobile terminal, touse multiple data channels to transmit to-be-transmitted data to thenetwork-side device comprises: determining, by a mobile terminal, to usemultiple data channels to transmit to-be-transmitted data to thenetwork-side device based on a transmission time requirement of theto-be-transmitted data.
 9. The method according to claim 1, wherein foreach data channel of the multiple data channels, the current trafficinformation of the respective data channel indicates remaining availabledata traffic of the respective data channel.
 10. The method according toclaim 1, wherein each of the multiple data channels is activated beforeselecting, by the mobile terminal, the at least two activated datachannels of the multiple data channels, and a quantity of the at leasttwo activated data channels is less than a quantity of the multiple datachannels.
 11. A mobile terminal, comprising: a processor; anon-transitory memory storing programming instructions executable by theprocessor, the programming instructions including instructions to:determine to use multiple data channels to transmit to-be-transmitteddata to a network-side device, wherein the to-be-transmitted data isdata of one application; divide the to-be-transmitted data into multipledata blocks according to a specified rule; determine current trafficinformation and service quality information of at least one of themultiple data channels; select at least two activated data channels ofthe multiple data channels to use to transmit the to-be-transmittedmultiple data blocks according to the service quality information of theat least one of the multiple data channels; and use the selected atleast two activated data channels to transmit the to-be-transmitted datato the network-side device, wherein using the selected at least twoactivated data channels comprises matching data blocks of the multipledata blocks to the at least two activated data channels based on theservice quality information of the at least one of the multiple datachannels.
 12. The mobile terminal according to claim 11, wherein theprogramming instructions further include instructions to: activate atleast two of the multiple data channels, to form the at least twoactivated data channels.
 13. The mobile terminal according to claim 11,wherein the service quality information of the at least one of themultiple data channels comprises: signal quality of the at least one ofthe multiple data channels; and a data transmission rate of the at leastone of the multiple data channels.
 14. The mobile terminal according toclaim 11, wherein the mobile terminal comprises at least one mobileterminal card, and the at least two activated data channels comprise adata channel supported by the at least one mobile terminal card.
 15. Themobile terminal according to claim 11, wherein the programminginstructions further include instructions to: detect whether a datachannel whose data traffic is used up exists in the selected at leasttwo activated data channels; and in response to detecting that a datachannel whose data traffic is used up exists in the selected at leasttwo activated data channels, stop using the data channel whose datatraffic is used up to transmit the to-be-transmitted data.
 16. Anon-transitory computer-readable storage medium storing programminginstructions executable by at least one processor, the programminginstructions including instructions to: determine to use multiple datachannels to transmit to-be-transmitted data to a network-side device,wherein the to-be-transmitted data is data of one application; dividethe to-be-transmitted data into multiple data blocks according to arule; determine current traffic information and service qualityinformation of at least one of the multiple data channels; select atleast two activated data channels of the multiple data channels to useto transmit the to-be-transmitted multiple data blocks according to theservice quality information of the at least one of the multiple datachannels; and use the selected at least two activated data channels totransmit the to-be-transmitted data to the network-side device, whereinusing the selected at least two activated data channels comprisesmatching data blocks of the multiple data blocks to the at least twoactivated data channels based on the service quality information of theat least one of the multiple data channels.
 17. The non-transitorycomputer-readable storage medium according to claim 16, wherein theprogramming instructions further include instructions to: activate atleast two of the multiple data channels, to form the at least twoactivated data channels.
 18. The non-transitory computer-readablestorage medium according to claim 16, wherein the service qualityinformation of the at least one of the multiple data channels comprises:signal quality of the at least one the multiple data channels; and adata transmission rate of the at least one of the multiple datachannels.
 19. The non-transitory computer-readable storage mediumaccording to claim 16, wherein a mobile terminal comprises at least onemobile terminal card, and the at least two activated data channelscomprise a data channel supported by the at least one mobile terminalcard.
 20. The non-transitory computer-readable storage medium accordingto claim 16, wherein the programming instructions further includeinstructions to: detect whether a data channel whose data traffic isused up exists in the selected at least two activated data channels; andin response to a data channel whose data traffic is used up existing inthe selected at least two activated data channels, stop using the datachannel whose data traffic is used up to transmit the to-be-transmitteddata.